home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr42
/
vocshow2.zip
/
VOC_IO.LIB
< prev
next >
Wrap
Text File
|
1993-06-08
|
3KB
|
76 lines
-- Copyright 1992 by Tom Moran. May be used by anyone for any purpose.
with DOS_Io,
Voc_Data;
package Voc_Io is
Data_Error : exception; -- impossible data values, premature eof,etc.
Not_Yet_Implemented: exception; -- not handled by this package
Disk_Full : exception; -- DOS write couldn't write full record
Status_Error : exception; -- handle must be open to read/write/get info
Name_Error : exception; -- path/file doesn't exist
Max_Sound_Length: Voc_Data.Block_Lengths := Voc_Data.Block_Lengths'Last;
-- reads of sound blocks bigger than max_sound_length will be split
-- automatically. may be modified by user
type Handles is limited private;
subtype Positive_Durations is Voc_Data.Positive_Durations;
procedure Open(Name : in String;
Handle : in out Handles);
procedure Read(Handle : in out Handles;
Block : out Voc_Data.Blocks);
procedure Create(Name : in String;
Handle : in out Handles);
procedure Write_Sound(Handle : in out Handles;
Block : in Voc_Data.Blocks);
procedure Write_Silence(Handle : in out Handles;
Interval : in Positive_Durations;
Sample_Rate: in Voc_Data.Sample_Rates := 8000);
procedure Write_Marker(Handle : in out Handles;
Mark : in Voc_Data.Markers);
procedure Write_Text(Handle : in out Handles;
Text : in String);
procedure Write_Repeat(Handle : in out Handles;
Count : in Voc_Data.Repeat_Counts);
procedure Write_End_Repeat(Handle : in out Handles);
procedure Close(Handle : in out Handles);
private
type File_Block_Lengths is range 0 .. 2 ** 24 - 1;
for File_Block_Lengths'Size use 24;
type Existing_Voice_Infos(Voice_To_Continue: Boolean := False) is
record
case Voice_To_Continue is
when False =>
null;
when True =>
Sample_Rate : Voc_Data.Sample_Rates;
Packing : Voc_Data.Pack_Types;
Remaining_Length: File_Block_Lengths;
end case;
end record;
type Handles is
record
File_Handle: DOS_Io.File_Handle;
Is_Input : Boolean := True;
Terminated : Boolean := False;
Voice_Info : Existing_Voice_Infos;
end record;
end Voc_Io;